<?php
if($_POST['PHPSESSID']!=''){
  session_id( $_POST['PHPSESSID'] );
}

session_start();
// if($_SERVER['REQUEST_METHOD"] == "POST"){
$p = fopen(dirname(__FILE__) ."/upload.log","w+");
fputs($p, print_r($_FILES,true));
fputs($p, print_r($_POST,true));
fputs($p, print_r($_GET,true));
fputs($p, print_r($_SESSION,true));

fclose($p);

//set_message('Uploaded media id =  101');;
$_SESSION['new_media_id'] = 101;
echo '1';
exit;
//}

// include('edit_media.php');

?>